package com.ttmusic.fragments.guide;

import com.ttmusic.activitys.MainActivity;
import com.ttmusic.activitys.R;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.TextView;

public class Guide4 extends Fragment implements OnClickListener{
	
	private View view;

	@Override  
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {  
		view = inflater.inflate(R.layout.guide4, container, false);  
        return view;  
    }

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		TextView into_app_btn = (TextView)view.findViewById(R.id.into_app_btn);
		into_app_btn.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
			case R.id.into_app_btn:
				Intent intent = new Intent(this.getActivity(), MainActivity.class);  
				startActivity(intent); 
				this.getActivity().overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);
				this.getActivity().finish();
				break;
			default:
				break;
		}
		
	}
	
}
